package vn.vietel.pms.entity;

import java.io.Serializable;
import java.util.Date;
import static org.jboss.seam.ScopeType.EVENT;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.NotNull;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

@Entity
@Name("vpropertydetails")
@Scope(EVENT)
@Table(name = "VPropertyDetails")
public class VPropertyDetails implements Serializable {

	private static final long serialVersionUID = 2016040408159156159L;
	private Long id;
	private String propertyName;
	private String propertyAlias;
	private Long statusId;
	private Date inusedDate;
	private Date providedDate;
	private VListOfProperty propertyId;
	private VBTSStation stationId;

	public VPropertyDetails() {
		super();
	}

	public VPropertyDetails(Long propertyId, Long stationId,
			String propertyName, String propertyAlias, Long statusId,
			Date inusedDate, Date providedDate) {
		super();
		this.propertyName = propertyName;
		this.propertyAlias = propertyAlias;
		this.statusId = statusId;
		this.inusedDate = inusedDate;
		this.providedDate = providedDate;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "detailsId")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPropertyName() {
		return propertyName;
	}

	public void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}

	public String getPropertyAlias() {
		return propertyAlias;
	}

	public void setPropertyAlias(String propertyAlias) {
		this.propertyAlias = propertyAlias;
	}

	@NotNull
	public Long getStatusId() {
		return statusId;
	}

	public void setStatusId(Long statusId) {
		this.statusId = statusId;
	}

	public Date getInusedDate() {
		return inusedDate;
	}

	public void setInusedDate(Date inusedDate) {
		this.inusedDate = inusedDate;
	}

	public Date getProvidedDate() {
		return providedDate;
	}

	public void setProvidedDate(Date providedDate) {
		this.providedDate = providedDate;
	}

	@ManyToOne()
	@JoinColumn(name = "propertyId")
	public VListOfProperty getPropertyId() {
		return propertyId;
	}

	public void setPropertyId(VListOfProperty propertyId) {
		this.propertyId = propertyId;
	}

	@ManyToOne()
	@JoinColumn(name = "stationId")
	public VBTSStation getStationId() {
		return stationId;
	}

	public void setStationId(VBTSStation stationId) {
		this.stationId = stationId;
	}

}
